<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>08-定时器之</title>
</head>
<body>
    <script>
        /* 
            setTimeout(函数，毫秒数)
            指定的时间后，这个函数自动执行
            返回值是定时器的名字
            后面的代码继续执行
        */
       let timer1 = setTimeout(play,3000);
       function play(){
           console.log('打篮球');
       }
    //   console.log(timer1);  定时器返回值1

       let timer2 = setTimeout((play) => {
           console.log('保熟！');
       }, 2000);
    //    console.log(timer2);  定时器返回值2

       let timer3 = setTimeout(function() {
           console.log('这瓜保熟吗？');
       }, 1000);
    //    console.log(timer3);  定时器返回值3
    </script>
</body>
</html>